package com.matrix.java.chap_04;

import java.util.Scanner;

/*
    顶点坐标
 */
public class Ex4_07 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter the radius of the bounding circle: ");
        double r = input.nextDouble();
        double x1 = r * Math.cos(Math.PI / 10);
        double y1 = r * Math.sin(Math.PI / 10);
        double x2 = r * Math.cos(Math.PI / 2);
        double y2 = r * Math.sin(Math.PI / 2);
        double x3 = r * Math.cos(9 * Math.PI / 10);
        double y3 = r * Math.sin(9 * Math.PI / 10);
        double x4 = r * Math.cos(13 * Math.PI / 10);
        double y4 = r * Math.sin(13 * Math.PI / 10);
        double x5 = r * Math.cos(17 * Math.PI / 10);
        double y5 = r * Math.sin(17 * Math.PI / 10);
        System.out.printf("%s%.2f%s%.2f%s\n", "(", x1, ",", y1, ")");
        System.out.printf("%s%.2f%s%.2f%s\n", "(", x2, ",", y2, ")");
        System.out.printf("%s%.2f%s%.2f%s\n", "(", x3, ",", y3, ")");
        System.out.printf("%s%.2f%s%.2f%s\n", "(", x4, ",", y4, ")");
        System.out.printf("%s%.2f%s%.2f%s\n", "(", x5, ",", y5, ")");
        input.close();
    }
}
